cmake_minimum_required(VERSION 3.16)
project(watermark_refactor)

set(CMAKE_CXX_STANDARD 17)

include_directories("/usr/local/include/opencv4")
include_directories("/usr/local/include/muduo")

find_package(OpenCV REQUIRED)

set(SRCFILE main.cpp
            base/Adder/AdderFactory.cpp
            base/Adder/AdderFactory.h
            base/Adder/IAdder.h
            base/Adder/IAdderFactory.h
            base/Adder/PictureAdder.cpp
            base/Adder/PictureAdder.h
            base/Adder/TextAdder.h
            base/Adder/TextAdder.cpp
            
            base/Codec/Codec.h
            base/Codec/ICodec.h
            base/Codec/Codec.cpp

            base/Timestamp.h
            base/currentThread.h
            base/currentThread.cpp
            
            server/Server.h
            server/Server.cpp)

add_executable(watermark_refactor ${SRCFILE})

target_link_libraries(watermark_refactor 
                        /home/hdf/github.com/build/release-cpp11/lib/libmuduo_base.a
                        /home/hdf/github.com/build/release-cpp11/lib/libmuduo_http.a
                        /home/hdf/github.com/build/release-cpp11/lib/libmuduo_inspect.a
                        /home/hdf/github.com/build/release-cpp11/lib/libmuduo_net.a  
                        /home/hdf/github.com/build/release-cpp11/lib/libmuduo_pubsub.a
        )

target_link_libraries(watermark_refactor  ${OpenCV_LIBS})
target_link_libraries(watermark_refactor  pthread)